/**
 * 作者: wgx
 * 日期: 2025-03-29 10:31:54
 * 备注: 餐厅美食攻略配置表
 */
package com.motu.monstercity.server.game.commondata.restaurant;

import io.vertx.core.json.JsonObject;

public class RestaurantFoodModel {
    protected int id; // id
    protected int skillId; // 相当于某个技能的id
    protected String restaurantType; // 所需参与的餐厅 (餐厅没有全部解锁，接待客人失败)
    protected int weight; // 美食攻略解锁后出现的权重
    protected String reward; // 特殊奖励
    protected int rewardWeight; // 特殊奖励概率 (万分比)

    public RestaurantFoodModel() {
    }

    public RestaurantFoodModel(JsonObject obj) {
        id = obj.containsKey("id") ? obj.getInteger("id") : 0;
        skillId = obj.containsKey("skill_id") ? obj.getInteger("skill_id") : 0;
        restaurantType = obj.containsKey("restaurant_type") ? obj.getString("restaurant_type") : "";
        weight = obj.containsKey("weight") ? obj.getInteger("weight") : 0;
        reward = obj.containsKey("reward") ? obj.getString("reward") : "";
        rewardWeight = obj.containsKey("reward_weight") ? obj.getInteger("reward_weight") : 0;
    }

    public int getId() {
        return id;
    }

    public int getSkillId() {
        return skillId;
    }

    public String getRestaurantType() {
        return restaurantType;
    }

    public int getWeight() {
        return weight;
    }

    public String getReward() {
        return reward;
    }

    public int getRewardWeight() {
        return rewardWeight;
    }

}
